﻿#region Imports
using System;
using System.Globalization;
using System.IO;
using System.Windows.Data;
#endregion Imports

namespace OneStopProgrammingMatrix.Converters
{
    public class ExtractFileNameConverter : IValueConverter
    {
        #region IValueConverter Members
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return Path.GetFileName((string)value);
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return null;
        }
        #endregion IValueConverter Members
    }
}
